import React, {Component} from 'react';
import {Provider} from 'react-redux'
import {BrowserRouter, Route} from 'react-router-dom';
import {GlobalStyle} from "./style";
import Header from './common/header/index'
import Home from "./pages/home"
import Detail from "./pages/detail"
import Login from "./pages/login"
import Write from "./pages/write"
import store from './store'

class App extends Component {
  render() {
    return (
      <div className='dell'>
        <GlobalStyle/>
        <Provider store={store}>
          <BrowserRouter>
            <Header/>
            <Route path="/" exact component={Home}/>
            <Route path="/login" exact component={Login}/>
            <Route path="/detail" exact component={Detail}/>
            <Route path="/write" exact component={Write}/>
          </BrowserRouter>
        </Provider>
      </div>
    );
  }
}

export default App;
